function rowOverEffect(object) {
  if (object.className == 'dataTableRow') object.className = 'dataTableRowOver';
}

function rowOutEffect(object) {
  if (object.className == 'dataTableRowOver') object.className = 'dataTableRow';
}

//根据选择值选中某项
function sel_item(obj,txt)
{
    len = obj.length;
	find = false;
    for (i = 0; i < len; i ++)
	{
	  cur = obj.options[i].text;
	  if (txt == cur)
	  {
	    find = true;
		obj.options[i].selected = true;
	  }
	}
	return find;
}

  function create_List(obj,sel_id)
  {
     var k = objSorts.childNodes.length;
	 var val;
	 var sarray;  //分离数组
	 var list_name; //列表框名字
     list_name = obj.name;  //获得本身的name值
     sarray = list_name.split('_');
	 var self_num = sarray[1];  //本身的序列
	 var next_num = eval(self_num) + 1; 
	 var n_num = next_num;
	 var  next_list = document.getElementById("sel_" + next_num);	 
	 var objSelect;
	 if (! cate[sel_id])  //没有子类时,删除下一个列表框
	 {  
	    //删除所有的子类列表框
	    for ($i = 1; $i < k;$i ++)
		{		 
  	     next_list = document.getElementById("sel_" + n_num);
 		 n_num ++;
	     if (next_list)
		  objSorts.removeChild(next_list);  
		}
	    return;
	 }
	 len = cate[sel_id].length;
	 if (len > 0)
	 {
	   if (! next_list)
	   {
         objSelect = document.createElement("select");
         objSelect.setAttribute("name", "sel_" + next_num);
         objSelect.setAttribute("id", "sel_" + next_num);
         objSelect.setAttribute("size", 0);
		 objSelect.style.width = 160;
		 objSelect.style.height = 160;
	   } else {
         objSelect = document.getElementById("sel_" + next_num);
		 clear(objSelect);
	   }
	   //新增<請選擇>
	   if (len > 0)
	   {
	     var objOption = document.createElement("option");
	     objOption.setAttribute("value", "");
	     var objText = document.createTextNode("請選擇..");
	     objOption.appendChild(objText);
	     objSelect.appendChild(objOption);	   
	   } //End if
	   for (i = 0; i < len; i ++)
	   {	 
         cate_val = cate[sel_id][i];
	     sarray = cate_val.split('|');
		 var cate_text = sarray[0];  //列表文本
		 var cate_value = sarray[1];  //列表值
		 if (cate[cate_value])
		 {
  		    cate_text = cate_text;
		 }
	     var objOption = document.createElement("option");
	     objOption.setAttribute("value", cate_value);
	     var objText = document.createTextNode(cate_text);
	     objOption.appendChild(objText);
	     objSelect.appendChild(objOption);	   
	   } //End if
       objSelect.onchange = function()
	   {
	     create_List(this,this.value);
	   }	
	   objSorts.appendChild(objSelect);
	 }
  }  
